﻿// AtlObject.cpp: CAtlObject 的实现

#include "pch.h"
#include "AtlObject.h"
#include <stdio.h>
#include <tchar.h>


// CAtlObject



STDMETHODIMP CAtlObject::Test()
{
    VARIANT v1;
    VARIANT v2;
    VariantInit(&v1);
    VariantInit(&v2);

    v1.vt = VT_BSTR;
    v1.bstrVal = SysAllocString(_T("HelloWOrld"));

    VariantCopy(&v2, &v1);
    VariantClear(&v1);
    VariantClear(&v2);

    CComBSTR BStr = L"abcdef";
    CComVariant v3(BStr);

    CComVariant v4;
    v4.Copy(&v3);

    return S_OK;
}
